package cn.lingyangwl.agile.food.core.model.rqrs.cart;

import cn.lingyangwl.agile.model.constants.ValidationCons;
import cn.lingyangwl.agile.food.model.entity.Cart;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;

/**
 * 购物车
 *
 * @author shenguangyang
 */
@Getter
@Setter
public class CartBase {
	@NotNull(message = ValidationCons.NOT_EMPTY)
	@ApiModelProperty(value = "商品id")
	private Long goodsId;

	@NotNull(message = ValidationCons.NOT_EMPTY)
	@ApiModelProperty(value = "商品数量")
	private Integer goodsNum;

	@NotNull(message = ValidationCons.NOT_EMPTY)
	@ApiModelProperty(value = "规格id")
	private Long goodsSkuId;

	@ApiModelProperty(value = "属性")
	private List<Cart.Attribute> attributeList = Collections.emptyList();

	@NotNull(message = ValidationCons.NOT_EMPTY)
	@ApiModelProperty(value = "包装费")
	private BigDecimal bagPrice;

	@NotNull(message = ValidationCons.NOT_EMPTY)
	@ApiModelProperty(value = "商品价格")
	private BigDecimal goodsPrice;

	@ApiModelProperty(value = "商品综合描述")
	private String describe;

	@NotNull(message = ValidationCons.NOT_EMPTY)
	@ApiModelProperty(value = "购物车类型: 0外卖, 1店内")
	private String cartType;
}
